package com.tianji.learning.service;

import com.tianji.api.dto.leanring.LearningLessonDTO;
import com.tianji.learning.domain.dto.LearningRecordFormDTO;
import com.tianji.learning.domain.po.LearningLesson;
import com.tianji.learning.domain.po.LearningRecord;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 * 学习记录表 服务类
 * </p>
 *
 * @author 赵博凯
 * @since 2025-10-22
 */
public interface ILearningRecordService extends IService<LearningRecord> {


    /**
     * 查询当前用户指定课程的学习进度 -供course课程微服务远程调用的
     *
     * @param courseId 课程id
     * @return 课表信息、学习记录及进度信息
     */
    LearningLessonDTO queryLearningRecordByCourse(Long courseId);

    LearningLesson queryByUserAndCourseId(Long userId, Long courseId);

    @Transactional
    void addLearningRecord(LearningRecordFormDTO recordDTO);
}